home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS02.ADF
/
Asm
/
setjmp.asm
< prev
next >
Wrap
Assembly Source File
|
1989-05-30
|
578b
|
23 lines
; setjmp.asm
;
; In the C program: have typedef int jmp_buf[13];
;
; call with:
; setjmp(environ); where environ is declared as a jmp_buf;
; and
; longjmp(environ,value); value is the value to be returned to the
; caller of setjmp. An integer;
RORG 0
XDEF _setjmp
XDEF _longjmp
_setjmp: movea.l (sp)+,a1
movea.l (sp),a0
movem.l sp-a1/d7-d2,(a0)
moveq.l #0,d0
jmp (a1)
_longjmp: movea.l 4(sp),a0
move.l 8(sp),d0
movem.l (a0),sp-a1/d7-d2
jmp (a1)
END